<?php

class Damages_Methods_Data_Damage {

  /**
   *
   * @var int 
   */
  public $id;

  /**
   *
   * @var Damages_Methods_Data_Dictionary_DamageType 
   */
  public $type;

  /**
   *
   * @var Damages_Methods_Data_Dictionary_DamageSpot 
   */
  public $spot;

  /**
   *
   * @var Damages_Methods_Data_Dictionary_DamageScale 
   */
  public $scale;

  /**
   *
   * @var string 
   */
  public $created;

  /**
   *
   * @var bool 
   */
  public $isMain;

  /**
   *
   * @var string 
   */
  public $modified;

  public function __construct(DamagesDamages $data) {
    $this->id = $data->getId();
    $this->type = new Damages_Methods_Data_Dictionary_DamageType($data->getDictDamageTypes());
    $this->spot = new Damages_Methods_Data_Dictionary_DamageSpot($data->getDictDamageSpots());
    $this->scale = new Damages_Methods_Data_Dictionary_DamageScale($data->getDictDamageScale());
    $this->isMain = (int)$data->getIsMain();
    $this->created = $data->getCreated();
    $this->modified = $data->getModified();
  }

}